package org.example.Single;


//这种方式属于懒汉式，因为静态内部类在外部访问内部变量时才会加载。
public class Singleton04 {
    private Singleton04(){};


    private static class SingletonHandle{
        private static final Singleton04 instance = new Singleton04();
    }

    public Singleton04 getinstance(){
        return SingletonHandle.instance;
    }
}
